Integrand size = 40, antiderivative size = 187 \[ \int \frac {\cos ^3(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {(13 B-6 C) x}{2 a^3}-\frac {8 (19 B-9 C) \sin (c+d x)}{15 a^3 d}+\frac {(13 B-6 C) \cos (c+d x) \sin (c+d x)}{2 a^3 d}-\frac {(B-C) \cos (c+d x) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(11 B-6 C) \cos (c+d x) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {4 (19 B-9 C) \cos (c+d x) \sin (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )} \]
[Out]
Time = 0.60 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {4157, 4105, 3872, 2715, 8, 2717} \[ \int \frac {\cos ^3(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=-\frac {8 (19 B-9 C) \sin (c+d x)}{15 a^3 d}+\frac {(13 B-6 C) \sin (c+d x) \cos (c+d x)}{2 a^3 d}-\frac {4 (19 B-9 C) \sin (c+d x) \cos (c+d x)}{15 d \left (a^3 \sec (c+d x)+a^3\right )}+\frac {x (13 B-6 C)}{2 a^3}-\frac {(11 B-6 C) \sin (c+d x) \cos (c+d x)}{15 a d (a \sec (c+d x)+a)^2}-\frac {(B-C) \sin (c+d x) \cos (c+d x)}{5 d (a \sec (c+d x)+a)^3} \]
[In]
[Out]
Rule 8
Rule 2715
Rule 2717
Rule 3872
Rule 4105
Rule 4157
Rubi steps \begin{align*} \text {integral}& = \int \frac {\cos ^2(c+d x) (B+C \sec (c+d x))}{(a+a \sec (c+d x))^3} \, dx \\ & = -\frac {(B-C) \cos (c+d x) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}+\frac {\int \frac {\cos ^2(c+d x) (a (7 B-2 C)-4 a (B-C) \sec (c+d x))}{(a+a \sec (c+d x))^2} \, dx}{5 a^2} \\ & = -\frac {(B-C) \cos (c+d x) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(11 B-6 C) \cos (c+d x) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}+\frac {\int \frac {\cos ^2(c+d x) \left (a^2 (43 B-18 C)-3 a^2 (11 B-6 C) \sec (c+d x)\right )}{a+a \sec (c+d x)} \, dx}{15 a^4} \\ & = -\frac {(B-C) \cos (c+d x) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(11 B-6 C) \cos (c+d x) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {4 (19 B-9 C) \cos (c+d x) \sin (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )}+\frac {\int \cos ^2(c+d x) \left (15 a^3 (13 B-6 C)-8 a^3 (19 B-9 C) \sec (c+d x)\right ) \, dx}{15 a^6} \\ & = -\frac {(B-C) \cos (c+d x) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(11 B-6 C) \cos (c+d x) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {4 (19 B-9 C) \cos (c+d x) \sin (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )}-\frac {(8 (19 B-9 C)) \int \cos (c+d x) \, dx}{15 a^3}+\frac {(13 B-6 C) \int \cos ^2(c+d x) \, dx}{a^3} \\ & = -\frac {8 (19 B-9 C) \sin (c+d x)}{15 a^3 d}+\frac {(13 B-6 C) \cos (c+d x) \sin (c+d x)}{2 a^3 d}-\frac {(B-C) \cos (c+d x) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(11 B-6 C) \cos (c+d x) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {4 (19 B-9 C) \cos (c+d x) \sin (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )}+\frac {(13 B-6 C) \int 1 \, dx}{2 a^3} \\ & = \frac {(13 B-6 C) x}{2 a^3}-\frac {8 (19 B-9 C) \sin (c+d x)}{15 a^3 d}+\frac {(13 B-6 C) \cos (c+d x) \sin (c+d x)}{2 a^3 d}-\frac {(B-C) \cos (c+d x) \sin (c+d x)}{5 d (a+a \sec (c+d x))^3}-\frac {(11 B-6 C) \cos (c+d x) \sin (c+d x)}{15 a d (a+a \sec (c+d x))^2}-\frac {4 (19 B-9 C) \cos (c+d x) \sin (c+d x)}{15 d \left (a^3+a^3 \sec (c+d x)\right )} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(435\) vs. \(2(187)=374\).
Time = 1.64 (sec) , antiderivative size = 435, normalized size of antiderivative = 2.33 \[ \int \frac {\cos ^3(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {\cos \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \left (600 (13 B-6 C) d x \cos \left (\frac {d x}{2}\right )+600 (13 B-6 C) d x \cos \left (c+\frac {d x}{2}\right )+3900 B d x \cos \left (c+\frac {3 d x}{2}\right )-1800 C d x \cos \left (c+\frac {3 d x}{2}\right )+3900 B d x \cos \left (2 c+\frac {3 d x}{2}\right )-1800 C d x \cos \left (2 c+\frac {3 d x}{2}\right )+780 B d x \cos \left (2 c+\frac {5 d x}{2}\right )-360 C d x \cos \left (2 c+\frac {5 d x}{2}\right )+780 B d x \cos \left (3 c+\frac {5 d x}{2}\right )-360 C d x \cos \left (3 c+\frac {5 d x}{2}\right )-12760 B \sin \left (\frac {d x}{2}\right )+7020 C \sin \left (\frac {d x}{2}\right )+7560 B \sin \left (c+\frac {d x}{2}\right )-4500 C \sin \left (c+\frac {d x}{2}\right )-9230 B \sin \left (c+\frac {3 d x}{2}\right )+4860 C \sin \left (c+\frac {3 d x}{2}\right )+930 B \sin \left (2 c+\frac {3 d x}{2}\right )-900 C \sin \left (2 c+\frac {3 d x}{2}\right )-2782 B \sin \left (2 c+\frac {5 d x}{2}\right )+1452 C \sin \left (2 c+\frac {5 d x}{2}\right )-750 B \sin \left (3 c+\frac {5 d x}{2}\right )+300 C \sin \left (3 c+\frac {5 d x}{2}\right )-105 B \sin \left (3 c+\frac {7 d x}{2}\right )+60 C \sin \left (3 c+\frac {7 d x}{2}\right )-105 B \sin \left (4 c+\frac {7 d x}{2}\right )+60 C \sin \left (4 c+\frac {7 d x}{2}\right )+15 B \sin \left (4 c+\frac {9 d x}{2}\right )+15 B \sin \left (5 c+\frac {9 d x}{2}\right )\right )}{480 a^3 d (1+\cos (c+d x))^3} \]
[In]
[Out]
Time = 0.26 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.57
method | result | size |
parallelrisch | \(\frac {15 \left (\left (-\frac {1856 B}{15}+\frac {312 C}{5}\right ) \cos \left (2 d x +2 c \right )+\left (-6 B +4 C \right ) \cos \left (3 d x +3 c \right )+B \cos \left (4 d x +4 c \right )+\left (-\frac {2002 B}{5}+\frac {972 C}{5}\right ) \cos \left (d x +c \right )-\frac {4303 B}{15}+\frac {696 C}{5}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+6240 \left (B -\frac {6 C}{13}\right ) x d}{960 a^{3} d}\) | \(107\) |
derivativedivides | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} B}{5}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} C}{5}+\frac {8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} C -31 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +17 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +\frac {16 \left (-\frac {7 B}{4}+\frac {C}{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+16 \left (-\frac {5 B}{4}+\frac {C}{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+4 \left (13 B -6 C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) | \(163\) |
default | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} B}{5}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} C}{5}+\frac {8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} C -31 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +17 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +\frac {16 \left (-\frac {7 B}{4}+\frac {C}{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+16 \left (-\frac {5 B}{4}+\frac {C}{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}+4 \left (13 B -6 C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d \,a^{3}}\) | \(163\) |
risch | \(\frac {13 B x}{2 a^{3}}-\frac {3 x C}{a^{3}}-\frac {i B \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 a^{3} d}+\frac {3 i B \,{\mathrm e}^{i \left (d x +c \right )}}{2 a^{3} d}-\frac {i {\mathrm e}^{i \left (d x +c \right )} C}{2 a^{3} d}-\frac {3 i B \,{\mathrm e}^{-i \left (d x +c \right )}}{2 a^{3} d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} C}{2 a^{3} d}+\frac {i B \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 a^{3} d}-\frac {2 i \left (150 B \,{\mathrm e}^{4 i \left (d x +c \right )}-90 C \,{\mathrm e}^{4 i \left (d x +c \right )}+525 B \,{\mathrm e}^{3 i \left (d x +c \right )}-300 C \,{\mathrm e}^{3 i \left (d x +c \right )}+745 B \,{\mathrm e}^{2 i \left (d x +c \right )}-420 C \,{\mathrm e}^{2 i \left (d x +c \right )}+485 B \,{\mathrm e}^{i \left (d x +c \right )}-270 C \,{\mathrm e}^{i \left (d x +c \right )}+127 B -72 C \right )}{15 d \,a^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{5}}\) | \(255\) |
norman | \(\frac {\frac {\left (13 B -6 C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{a}-\frac {\left (13 B -6 C \right ) x}{2 a}-\frac {\left (B -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{20 a d}-\frac {\left (13 B -6 C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{a}+\frac {\left (13 B -6 C \right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{2 a}+\frac {\left (17 B -12 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{30 a d}-\frac {4 \left (28 B -13 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{5 a d}+\frac {\left (51 B -25 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a d}-\frac {\left (77 B -39 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{12 a d}+\frac {\left (131 B -60 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{6 a d}-\frac {\left (377 B -177 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{60 a d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) a^{2}}\) | \(298\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 190, normalized size of antiderivative = 1.02 \[ \int \frac {\cos ^3(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {15 \, {\left (13 \, B - 6 \, C\right )} d x \cos \left (d x + c\right )^{3} + 45 \, {\left (13 \, B - 6 \, C\right )} d x \cos \left (d x + c\right )^{2} + 45 \, {\left (13 \, B - 6 \, C\right )} d x \cos \left (d x + c\right ) + 15 \, {\left (13 \, B - 6 \, C\right )} d x + {\left (15 \, B \cos \left (d x + c\right )^{4} - 15 \, {\left (3 \, B - 2 \, C\right )} \cos \left (d x + c\right )^{3} - {\left (479 \, B - 234 \, C\right )} \cos \left (d x + c\right )^{2} - 3 \, {\left (239 \, B - 114 \, C\right )} \cos \left (d x + c\right ) - 304 \, B + 144 \, C\right )} \sin \left (d x + c\right )}{30 \, {\left (a^{3} d \cos \left (d x + c\right )^{3} + 3 \, a^{3} d \cos \left (d x + c\right )^{2} + 3 \, a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \]
[In]
[Out]
\[ \int \frac {\cos ^3(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {\int \frac {B \cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {C \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec {\left (c + d x \right )} + 1}\, dx}{a^{3}} \]
[In]
[Out]
none
Time = 0.34 (sec) , antiderivative size = 322, normalized size of antiderivative = 1.72 \[ \int \frac {\cos ^3(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=-\frac {B {\left (\frac {60 \, {\left (\frac {5 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {7 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a^{3} + \frac {2 \, a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a^{3} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {\frac {465 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {40 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {780 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}\right )} - 3 \, C {\left (\frac {40 \, \sin \left (d x + c\right )}{{\left (a^{3} + \frac {a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} + \frac {\frac {85 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {10 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {\sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}}{a^{3}} - \frac {120 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}}\right )}}{60 \, d} \]
[In]
[Out]
none
Time = 0.33 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.07 \[ \int \frac {\cos ^3(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {\frac {30 \, {\left (d x + c\right )} {\left (13 \, B - 6 \, C\right )}}{a^{3}} - \frac {60 \, {\left (7 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 5 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2} a^{3}} - \frac {3 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 40 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 30 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 465 \, B a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 255 \, C a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{15}}}{60 \, d} \]
[In]
[Out]
Time = 15.92 (sec) , antiderivative size = 204, normalized size of antiderivative = 1.09 \[ \int \frac {\cos ^3(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^3} \, dx=\frac {x\,\left (13\,B-6\,C\right )}{2\,a^3}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {3\,\left (B-C\right )}{2\,a^3}+\frac {3\,\left (5\,B-3\,C\right )}{4\,a^3}+\frac {10\,B-2\,C}{4\,a^3}\right )}{d}-\frac {\left (7\,B-2\,C\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (5\,B-2\,C\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a^3\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {B-C}{4\,a^3}+\frac {5\,B-3\,C}{12\,a^3}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (B-C\right )}{20\,a^3\,d} \]
[In]
[Out]